package org.ns.socket.client.handler;

import org.ns.socket.client.codec.SocketDecodeHandler;
import org.ns.socket.client.codec.SocketEncodeHandler;

import java.io.IOException;
import java.util.concurrent.ExecutorService;

public interface SocketHandler {

    void setWorkerThread(ExecutorService workerThread);

    void connect(String host, int port)throws IOException ;

    void setSocketDecodeHandler(SocketDecodeHandler socketDecodeHandler);

    void setSocketEncodeHandler(SocketEncodeHandler socketEncodeHandler);

    void setSocketReaderHandler(SocketReaderHandler socketReaderHandler);

    void setSocketConfig(SocketConfig socketConfig);
    void write(Object msg);

    void close() throws IOException;
}
